using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace XiaoMan.Model.Models.Mapping
{
    public class Forum_Topic_TypeMap : EntityTypeConfiguration<Forum_Topic_Type>
    {
        public Forum_Topic_TypeMap()
        {
            // Primary Key
            this.HasKey(t => t.TopicTypeID);

            // Properties
            this.Property(t => t.TopicTypeName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Forum_Topic_Type");
            this.Property(t => t.TopicTypeID).HasColumnName("TopicTypeID");
            this.Property(t => t.DiseaseID).HasColumnName("DiseaseID");
            this.Property(t => t.TopicTypeName).HasColumnName("TopicTypeName");
            this.Property(t => t.DisplayOrder).HasColumnName("DisplayOrder");
        }
    }
}
